home *** CD-ROM | disk | FTP | other *** search
- 1< The Dungeon's 2SUBLIST1 mod >
- Master Daarkhan #1 @7653
- Fri Jan 03 03:12:52 1992
-
- 2The Dungeon's Sublist Modification 1By DaarKhan 1@7653
-
-
- This is a real simple mod (can you block read?) that I use to simplify
- the listing of my subbases. It is set up for a board with the 764 subbase0 mod
- installed. Without the 64 subbase mod, you really don't need this, but if you
- want to install it anyways, you're on your own re-configuring it!
-
- What it does is let the user select if they want to see the LOCAL subs,
- or the NET subs, and I also have it configured to list my ROLE-PLAYING subs.
- You can change the later to be whatever you want, just include a certain
- string in the TITLE of the subbases you want to seperate from the rest (e.g.
- all of my role-playing subs have "RPG" in the title, so that this mod can
- seperate them. You can change it to whatever you want (for example, if you
- carry a lot of ANSI art subs, change it so that all of your ANSI art subs
- have the string "ANSI" in the title, and your all set.)
-
- Just block read this puppy in as your new 1void sublist()0 in 2BBS.C0 (I
- think). Like I said, I just yanked this out of my code and and printing it
- for you, so if there are any little subtle problems with it (like a variable
- that you don't have declared or something), then Email me and I'll help you
- out. This 7should0 work 100% though (BTW: I run WWIV 4.12, but it should work
- with any WWIV version with the 64 sub mod installed).
-
- I support my mods, but if your computer blows up, I'm not responsible and
- [insert standard disclaimer here], but I will try and help you out if
- possible. Ask anyone who subscribes to one of my subs, I'm a 4real0 nice guy
- (evil grin).
-
- 1______________________BLOCK READ BEGIN___________________________
-
- void sublist()
- {
- int i,abort;
- char ch,s[80],s1[80],a[80],b[80],d[80];
-
- do {
- prt(2,"Sublist [L,N,R,*,Q,?] : ");
- ch=onek("LNR*Q?");
- switch (ch) {
- case '?':
- prt(3,"Help");
- nl();
- printfile("SUB_MENU"); /* Make this file! */
- break;
- case 'Q':
- prt(3,"Quit");
- nl();
- return;
- case 'L':
- prt(3,"Local subs");
- nl();
- break;
- case 'N':
- prt(3,"Network subs");
- nl();
- break;
- case 'R':
- prt(3,"Role-playing subs"); /* Change if you want */
- nl();
- break;
- case '*':
- prt(3,"All subs");
- nl();
- break;
- }
- } while (ch=='?');
- abort=0;
- i=0;
-
- while ((i<64) && (usub[i].subnum!=-1)) {
- if (usub[i].subnum<32) {
- if ((1L << (usub[i].subnum)) & thisuser.qscn)
- strcpy(a,usub[i].keys);
- else
- strcpy(a,"--");
- } else {
- if ((1L << (usub[i].subnum-32)) & thisuser.qscn2)
- strcpy(a,usub[i].keys);
- else
- strcpy(a,"--");
- }
-
- if (syscfg.systemnumber) {
- if (subboards[usub[i].subnum].type) {
- if (subboards[usub[i].subnum].anony & anony_val_net)
- strcpy(b,"[Net]");
- else
- strcpy(b,"<Net>");
- } else
- strcpy(b," ");
- }
-
- strcpy(d,subboards[usub[i].subnum].name);
-
-
- sprintf(s," 1%2.2s 7%-5.5s 2%-50.50s0 ",a,b,d);
-
- switch (ch) {
- case 'L':
- if (!subboards[usub[i].subnum].type) pla(s,&abort);
- break;
- case 'N':
- if (subboards[usub[i].subnum].type) pla(s,&abort);
- break;
- case 'R':
- if (strstr(subboards[usub[i].subnum].name,"RPG")!=NULL)
- pla(s,&abort);
- break;
- case '*':
- pla(s,&abort);
- break;
- }
- i++;
- }
- if (i==0)
- pla("None.",&abort);
- nl();
- }
-
- 1_____________________BLOCK READ END_______________________
-
-
- There you go! Like I said, if you have any problems, please get in touch
- with me!
-
- 3┌┐7┌┐1┌┐7┌┐3┌┐
- 3│4Daarkhan3│
- 3└┘7└┘1└┘7└┘3└┘
-